.container.nav-padding

.navbar.navbar-bg.navbar-fixed-top.navbar-height
	.container
		.navbar-header
			a.navbar-brand.text-white.title-text(href="/") 
				i KKMM电影网
		.col-md-9.search-padding
			form(method="GET", action="/results")
				.input-group.col-sm-4.pull-right
					input.form-control.search-input(type="text", name="q", placeholder="摔跤吧！爸爸")
					span.input-group-btn
						button.btn.search-btn(type="submit")
							span.glyphicon.glyphicon-search
		if user
			p.navbar-text.navbar-right.text-gray
				span 欢迎您，#{user.name}
				span &nbsp;|&nbsp;
				a.navbar-link(href="/logout") 退出

		else
			p.navbar-text.navbar-right.text-gray
				a.navbar-link(href="#", data-toggle="modal", data-target="#signupModal") 注册
				span &nbsp;|&nbsp;
				a.navbar-link(href="#", data-toggle="modal", data-target="#signinModal") 登录
#signupModal.modal.fade
	.modal-dialog
		.modal-content
			form(method="POST",action="/user/signup")
				.modal-header 注册
				.modal-body
					.form-group
						label(for="signupName") 用户名
						input#signupName.form-control(name="user[name]", type="text")
					.form-group
						label(for="signupPassword") 密码
						input#signupPassword.form-control(name="user[password]", type="password")
				.modal-footer
					button.btn.btn-default(type="button", data-dismiss="modal") 关闭
					button.btn.btn-success(type="submit") 注册
#signinModal.modal.fade
	.modal-dialog
		.modal-content
			form(method="POST",action="/user/signin")
				.modal-header 登录
				.modal-body
					.form-group
						label(for="signinName") 用户名
						input#signinName.form-control(name="user[name]", type="text")
					.form-group
						label(for="signinPassword") 密码
						input#signinPassword.form-control(name="user[password]", type="password")
				.modal-footer
					button.btn.btn-default(type="button", data-dismiss="modal") 关闭
					button.btn.btn-success(type="submit") 登录


